package com.example.day09.ex03;

import com.example.day14.ex03.Student;

import java.util.ArrayList;

/**
 * @author 17976
 */
public class ArrayListTeat02 {
    public static void main(String[] args) {
        ArrayList<Student> array = new ArrayList<>();

        Student s1 = new Student("林青霞", 30);
        Student s2 = new Student("风清扬", 33);
        Student s3 = new Student("张曼玉", 18);

        array.add(s1);
        array.add(s2);
        array.add(s3);
        for (int i = 0; i < array.size(); i++) {
            Student s=array.get(i);
            System.out.println(s.getName()+","+s.getAge());

        }

    }
}
